Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue 561: Soft min transformation #562

Merged
merged 1 commit into from
Dec 19, 2024

Conversation

SamuelBrand1
Copy link
Collaborator

This PR closes #561.

This is a small PR which simply redefines the Ascertainment part of the observation model composition to have a custom transformation which soft mins the expected observations at 1e15 chosen so that the InexactErrors are not caused by wild sampling in some models.

I also increased the pipeline test draws to better check if this is operating as expected.

PS

I've done this as an extension of the work in #560 so if @seabbs is happy with that we can do this PR as a 2-fer.

Minor change: I noted that fetch was still being used in the tests as a legacy of using Dagger.jl. This didn't error because it has a sensible Base default but I've removed as unnecessary.

Also removed unnecessary call to `fetch`
@SamuelBrand1 SamuelBrand1 requested a review from seabbs December 19, 2024 00:01
Copy link
Contributor

Try this Pull Request!

Open Julia and type:

import Pkg
Pkg.activate(temp=true)
Pkg.add(url="https://github.com/CDCgov/Rt-without-renewal", rev="new-obs-trans", subdir="EpiAware")
using EpiAware

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.96%. Comparing base (ae5c564) to head (b8d6f1f).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #562   +/-   ##
=======================================
  Coverage   90.96%   90.96%           
=======================================
  Files          60       60           
  Lines         863      863           
=======================================
  Hits          785      785           
  Misses         78       78           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@seabbs seabbs changed the base branch from main to 559-report-for-mcmc-quality December 19, 2024 10:58
Copy link
Collaborator

@seabbs seabbs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice this looks good to me! Phew we should have done this a while ago.

Note I rebased this to your target PR vs main to catch this is a stacked PR.

If fetch was from Dagger does this mean Dagger is living in the Project.toml still and not being used? Should we remove it?

@SamuelBrand1
Copy link
Collaborator Author

If fetch was from Dagger does this mean Dagger is living in the Project.toml still and not being used? Should we remove it?

Dagger isn't in the Project anymore, I missed this in testing because Base.fetch has a just pass through fallback method https://docs.julialang.org/en/v1/base/parallel/#Base.fetch-Tuple{Any}

@SamuelBrand1 SamuelBrand1 merged commit e894504 into 559-report-for-mcmc-quality Dec 19, 2024
11 checks passed
@SamuelBrand1 SamuelBrand1 deleted the new-obs-trans branch December 19, 2024 11:32
github-merge-queue bot pushed a commit that referenced this pull request Dec 19, 2024
* Create make_mcmc_diagnostic_dataframe.jl

* reorg scripts and add more success/fail analysis

* Add function to get run info to avoid DRY

* Add function to do diagnostics

* export new func

* update SI

* Issue 561: Soft min transformation (#562)

Also removed unnecessary call to `fetch`

* base values on pipeline types

* breakdown mcmc convergence test function

Adds more stats and a unit test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Test avoiding InExactError by using TransformObservationModel
3 participants